package itheima03;

import java.io.Serializable;
import java.util.List;

/*
    1.定义Runnable接口的实现类
    2.Runnable接口的实现类覆盖重写run方法,指定线程任务
 */
public class MyRunImpl implements Runnable {

    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread().getName()+"...."+i);
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
